<?php if (!isset($fckeditor_included)) { $fckeditor_included=1; ?>
<script type="text/javascript" src="<?php echo HTTP_SERVER?>javascript/fckeditor/fckeditor.js"></script>
<?php } ?>
<?php
if (isset($_SERVER['HTTPS'])) { 
    $server = HTTPS_SERVER; 
} else { 
    $server = HTTP_SERVER; 
}
?>

<script type="text/javascript"><!--

	var sBasePath		= '<?php echo $server?>javascript/fckeditor/';
	var sConfig		= 'myconfig.js';

	var textareas = document.getElementsByTagName('textarea');
	for ( var i = 0 ; i < textareas.length ; i++ ) {
		var textarea	= textareas[i];
		var name		= textarea.name;
		var className	= textarea.className;
		//if (!name || name.length == 0) continue;
		if (!className || className != 'editor') continue;
		var oFCKeditor		= new FCKeditor(name);
		oFCKeditor.BasePath	= sBasePath;
		oFCKeditor.Value	= name.value;
		oFCKeditor.Width	= '600';
		oFCKeditor.Height	= '300';
		oFCKeditor.Config['CustomConfigurationsPath']	= oFCKeditor.BasePath + sConfig;
		oFCKeditor.Config['DocType']			= '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">';
		oFCKeditor.Config['SkinPath']			= oFCKeditor.BasePath + 'editor/skins/silver/';
		oFCKeditor.ToolbarSet				= 'Custom';
		oFCKeditor.ReplaceTextarea();
	}
//--></script>
